3.67 \(\int (f+g x)^3 (A+B \log (e (\frac{a+b x}{c+d x})^n))^2 \, dx\)

Optimal. Leaf size=923 \[ \frac{B^2 g^3 n^2 \log \left (\frac{a+b x}{c+d x}\right ) (b c-a d)^4}{6 b^4 d^4}+\frac{B^2 g^3 n^2 \log (c+d x) (b c-a d)^4}{6 b^4 d^4}+\frac{B^2 g^3 n^2 x (b c-a d)^3}{6 b^3 d^3}+\frac{B^2 g^2 (4 b d f-3 b c g-a d g) n^2 \log \left (\frac{a+b x}{c+d x}\right ) (b c-a d)^3}{4 b^4 d^4}+\frac{B^2 g^2 (4 b d f-3 b c g-a d g) n^2 \log (c+d x) (b c-a d)^3}{4 b^4 d^4}+\frac{B^2 g^3 n^2 (c+d x)^2 (b c-a d)^2}{12 b^2 d^4}+\frac{B^2 g^2 (4 b d f-3 b c g-a d g) n^2 x (b c-a d)^2}{4 b^3 d^3}+\frac{B^2 g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) n^2 \log (c+d x) (b c-a d)^2}{2 b^4 d^4}-\frac{B g^3 n (c+d x)^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) (b c-a d)}{6 b d^4}-\frac{B g^2 (4 b d f-3 b c g-a d g) n (c+d x)^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) (b c-a d)}{4 b^2 d^4}-\frac{B g \left (\left (6 d^2 f^2-8 c d g f+3 c^2 g^2\right ) b^2-2 a d g (2 d f-c g) b+a^2 d^2 g^2\right ) n (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) (b c-a d)}{2 b^4 d^3}-\frac{B (2 b d f-b c g-a d g) \left (-\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2+2 a d^2 f g b-a^2 d^2 g^2\right ) n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac{b c-a d}{b (c+d x)}\right ) (b c-a d)}{2 b^4 d^4}-\frac{B^2 (2 b d f-b c g-a d g) \left (-\left (2 d^2 f^2-2 c d g f+c^2 g^2\right ) b^2+2 a d^2 f g b-a^2 d^2 g^2\right ) n^2 \text{PolyLog}\left (2,\frac{d (a+b x)}{b (c+d x)}\right ) (b c-a d)}{2 b^4 d^4}-\frac{(b f-a g)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g} \]

[Out]

(B^2*(b*c - a*d)^3*g^3*n^2*x)/(6*b^3*d^3) + (B^2*(b*c - a*d)^2*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*n^2*x)/(4*b^3*d
^3) + (B^2*(b*c - a*d)^2*g^3*n^2*(c + d*x)^2)/(12*b^2*d^4) - (B*(b*c - a*d)*g*(a^2*d^2*g^2 - 2*a*b*d*g*(2*d*f
- c*g) + b^2*(6*d^2*f^2 - 8*c*d*f*g + 3*c^2*g^2))*n*(a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(2*b^4*d
^3) - (B*(b*c - a*d)*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*n*(c + d*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(4*
b^2*d^4) - (B*(b*c - a*d)*g^3*n*(c + d*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(6*b*d^4) - ((b*f - a*g)^4
*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(4*b^4*g) + ((f + g*x)^4*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/
(4*g) - (B*(b*c - a*d)*(2*b*d*f - b*c*g - a*d*g)*(2*a*b*d^2*f*g - a^2*d^2*g^2 - b^2*(2*d^2*f^2 - 2*c*d*f*g + c
^2*g^2))*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[(b*c - a*d)/(b*(c + d*x))])/(2*b^4*d^4) + (B^2*(b*c - a*
d)^4*g^3*n^2*Log[(a + b*x)/(c + d*x)])/(6*b^4*d^4) + (B^2*(b*c - a*d)^3*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*n^2*Lo
g[(a + b*x)/(c + d*x)])/(4*b^4*d^4) + (B^2*(b*c - a*d)^4*g^3*n^2*Log[c + d*x])/(6*b^4*d^4) + (B^2*(b*c - a*d)^
3*g^2*(4*b*d*f - 3*b*c*g - a*d*g)*n^2*Log[c + d*x])/(4*b^4*d^4) + (B^2*(b*c - a*d)^2*g*(a^2*d^2*g^2 - 2*a*b*d*
g*(2*d*f - c*g) + b^2*(6*d^2*f^2 - 8*c*d*f*g + 3*c^2*g^2))*n^2*Log[c + d*x])/(2*b^4*d^4) - (B^2*(b*c - a*d)*(2
*b*d*f - b*c*g - a*d*g)*(2*a*b*d^2*f*g - a^2*d^2*g^2 - b^2*(2*d^2*f^2 - 2*c*d*f*g + c^2*g^2))*n^2*PolyLog[2, (
d*(a + b*x))/(b*(c + d*x))])/(2*b^4*d^4)

________________________________________________________________________________________

Rubi [A]  time = 1.83533, antiderivative size = 1060, normalized size of antiderivative = 1.15, number of steps used = 31, number of rules used = 13, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.406, Rules used = {2525, 12, 2528, 2486, 31, 72, 2524, 2418, 2390, 2301, 2394, 2393, 2391} \[ \frac{B^2 n^2 \log ^2(a+b x) (b f-a g)^4}{4 b^4 g}-\frac{B n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) (b f-a g)^4}{2 b^4 g}-\frac{B^2 n^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right ) (b f-a g)^4}{2 b^4 g}-\frac{B^2 n^2 \text{PolyLog}\left (2,-\frac{d (a+b x)}{b c-a d}\right ) (b f-a g)^4}{2 b^4 g}+\frac{B^2 (b c-a d)^2 g^3 n^2 x^2}{12 b^2 d^2}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B^2 (d f-c g)^4 n^2 \log ^2(c+d x)}{4 d^4 g}-\frac{B^2 (b c-a d)^2 (b c+a d) g^3 n^2 x}{6 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2 x}{4 b^3 d^3}-\frac{A B (b c-a d) g \left (\left (6 d^2 f^2-4 c d g f+c^2 g^2\right ) b^2-a d g (4 d f-c g) b+a^2 d^2 g^2\right ) n x}{2 b^3 d^3}-\frac{a^3 B^2 (b c-a d) g^3 n^2 \log (a+b x)}{6 b^4 d}+\frac{a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (a+b x)}{4 b^4 d^2}-\frac{B^2 (b c-a d) g \left (\left (6 d^2 f^2-4 c d g f+c^2 g^2\right ) b^2-a d g (4 d f-c g) b+a^2 d^2 g^2\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}+\frac{B^2 c^3 (b c-a d) g^3 n^2 \log (c+d x)}{6 b d^4}-\frac{B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (c+d x)}{4 b^2 d^4}+\frac{B^2 (b c-a d)^2 g \left (\left (6 d^2 f^2-4 c d g f+c^2 g^2\right ) b^2-a d g (4 d f-c g) b+a^2 d^2 g^2\right ) n^2 \log (c+d x)}{2 b^4 d^4}-\frac{B^2 (d f-c g)^4 n^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{2 d^4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}-\frac{B^2 (d f-c g)^4 n^2 \text{PolyLog}\left (2,\frac{b (c+d x)}{b c-a d}\right )}{2 d^4 g} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2,x]

[Out]

-(A*B*(b*c - a*d)*g*(a^2*d^2*g^2 - a*b*d*g*(4*d*f - c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*n*x)/(2*b^3*
d^3) - (B^2*(b*c - a*d)^2*(b*c + a*d)*g^3*n^2*x)/(6*b^3*d^3) + (B^2*(b*c - a*d)^2*g^2*(4*b*d*f - b*c*g - a*d*g
)*n^2*x)/(4*b^3*d^3) + (B^2*(b*c - a*d)^2*g^3*n^2*x^2)/(12*b^2*d^2) - (a^3*B^2*(b*c - a*d)*g^3*n^2*Log[a + b*x
])/(6*b^4*d) + (a^2*B^2*(b*c - a*d)*g^2*(4*b*d*f - b*c*g - a*d*g)*n^2*Log[a + b*x])/(4*b^4*d^2) + (B^2*(b*f -
a*g)^4*n^2*Log[a + b*x]^2)/(4*b^4*g) - (B^2*(b*c - a*d)*g*(a^2*d^2*g^2 - a*b*d*g*(4*d*f - c*g) + b^2*(6*d^2*f^
2 - 4*c*d*f*g + c^2*g^2))*n*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/(2*b^4*d^3) - (B*(b*c - a*d)*g^2*(4*b*d*
f - b*c*g - a*d*g)*n*x^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(4*b^2*d^2) - (B*(b*c - a*d)*g^3*n*x^3*(A + B
*Log[e*((a + b*x)/(c + d*x))^n]))/(6*b*d) - (B*(b*f - a*g)^4*n*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))
^n]))/(2*b^4*g) + ((f + g*x)^4*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(4*g) + (B^2*c^3*(b*c - a*d)*g^3*n^2*
Log[c + d*x])/(6*b*d^4) - (B^2*c^2*(b*c - a*d)*g^2*(4*b*d*f - b*c*g - a*d*g)*n^2*Log[c + d*x])/(4*b^2*d^4) + (
B^2*(b*c - a*d)^2*g*(a^2*d^2*g^2 - a*b*d*g*(4*d*f - c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*n^2*Log[c +
d*x])/(2*b^4*d^4) - (B^2*(d*f - c*g)^4*n^2*Log[-((d*(a + b*x))/(b*c - a*d))]*Log[c + d*x])/(2*d^4*g) + (B*(d*f
 - c*g)^4*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x])/(2*d^4*g) + (B^2*(d*f - c*g)^4*n^2*Log[c + d*
x]^2)/(4*d^4*g) - (B^2*(b*f - a*g)^4*n^2*Log[a + b*x]*Log[(b*(c + d*x))/(b*c - a*d)])/(2*b^4*g) - (B^2*(b*f -
a*g)^4*n^2*PolyLog[2, -((d*(a + b*x))/(b*c - a*d))])/(2*b^4*g) - (B^2*(d*f - c*g)^4*n^2*PolyLog[2, (b*(c + d*x
))/(b*c - a*d)])/(2*d^4*g)

Rule 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
 1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2528

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*
RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalF
unctionQ[RGx, x] && IGtQ[n, 0]

Rule 2486

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p*
(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] &&
EqQ[p + q, 0] && IGtQ[s, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 2524

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[d + e*x]*(a + b
*Log[c*RFx^p])^n)/e, x] - Dist[(b*n*p)/e, Int[(Log[d + e*x]*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x
] /; FreeQ[{a, b, c, d, e, p}, x] && RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int (f+g x)^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2 \, dx &=\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}-\frac{(B n) \int \frac{(b c-a d) (f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}-\frac{(B (b c-a d) n) \int \frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{(a+b x) (c+d x)} \, dx}{2 g}\\ &=\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}-\frac{(B (b c-a d) n) \int \left (\frac{g^2 \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{b^3 d^3}+\frac{g^3 (4 b d f-b c g-a d g) x \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{b^2 d^2}+\frac{g^4 x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{b d}+\frac{(b f-a g)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{b^3 (b c-a d) (a+b x)}+\frac{(d f-c g)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{d^3 (-b c+a d) (c+d x)}\right ) \, dx}{2 g}\\ &=\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}-\frac{\left (B (b c-a d) g^3 n\right ) \int x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \, dx}{2 b d}-\frac{\left (B (b f-a g)^4 n\right ) \int \frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{2 b^3 g}+\frac{\left (B (d f-c g)^4 n\right ) \int \frac{A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{2 d^3 g}-\frac{\left (B (b c-a d) g^2 (4 b d f-b c g-a d g) n\right ) \int x \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \, dx}{2 b^2 d^2}-\frac{\left (B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n\right ) \int \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \, dx}{2 b^3 d^3}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}-\frac{\left (B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n\right ) \int \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right ) \, dx}{2 b^3 d^3}+\frac{\left (B^2 (b c-a d) g^3 n^2\right ) \int \frac{(b c-a d) x^3}{(a+b x) (c+d x)} \, dx}{6 b d}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \int \frac{(c+d x) \left (-\frac{d (a+b x)}{(c+d x)^2}+\frac{b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{2 b^4 g}-\frac{\left (B^2 (d f-c g)^4 n^2\right ) \int \frac{(c+d x) \left (-\frac{d (a+b x)}{(c+d x)^2}+\frac{b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{2 d^4 g}+\frac{\left (B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2\right ) \int \frac{(b c-a d) x^2}{(a+b x) (c+d x)} \, dx}{4 b^2 d^2}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}+\frac{\left (B^2 (b c-a d)^2 g^3 n^2\right ) \int \frac{x^3}{(a+b x) (c+d x)} \, dx}{6 b d}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \int \left (\frac{b \log (a+b x)}{a+b x}-\frac{d \log (a+b x)}{c+d x}\right ) \, dx}{2 b^4 g}-\frac{\left (B^2 (d f-c g)^4 n^2\right ) \int \left (\frac{b \log (c+d x)}{a+b x}-\frac{d \log (c+d x)}{c+d x}\right ) \, dx}{2 d^4 g}+\frac{\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2\right ) \int \frac{x^2}{(a+b x) (c+d x)} \, dx}{4 b^2 d^2}+\frac{\left (B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n^2\right ) \int \frac{1}{c+d x} \, dx}{2 b^4 d^3}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n^2 \log (c+d x)}{2 b^4 d^4}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}+\frac{\left (B^2 (b c-a d)^2 g^3 n^2\right ) \int \left (\frac{-b c-a d}{b^2 d^2}+\frac{x}{b d}-\frac{a^3}{b^2 (b c-a d) (a+b x)}-\frac{c^3}{d^2 (-b c+a d) (c+d x)}\right ) \, dx}{6 b d}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \int \frac{\log (a+b x)}{a+b x} \, dx}{2 b^3 g}-\frac{\left (B^2 d (b f-a g)^4 n^2\right ) \int \frac{\log (a+b x)}{c+d x} \, dx}{2 b^4 g}-\frac{\left (b B^2 (d f-c g)^4 n^2\right ) \int \frac{\log (c+d x)}{a+b x} \, dx}{2 d^4 g}+\frac{\left (B^2 (d f-c g)^4 n^2\right ) \int \frac{\log (c+d x)}{c+d x} \, dx}{2 d^3 g}+\frac{\left (B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2\right ) \int \left (\frac{1}{b d}+\frac{a^2}{b (b c-a d) (a+b x)}+\frac{c^2}{d (-b c+a d) (c+d x)}\right ) \, dx}{4 b^2 d^2}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B^2 (b c-a d)^2 (b c+a d) g^3 n^2 x}{6 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2 x}{4 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^3 n^2 x^2}{12 b^2 d^2}-\frac{a^3 B^2 (b c-a d) g^3 n^2 \log (a+b x)}{6 b^4 d}+\frac{a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (a+b x)}{4 b^4 d^2}-\frac{B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B^2 c^3 (b c-a d) g^3 n^2 \log (c+d x)}{6 b d^4}-\frac{B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (c+d x)}{4 b^2 d^4}+\frac{B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n^2 \log (c+d x)}{2 b^4 d^4}-\frac{B^2 (d f-c g)^4 n^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{2 d^4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}-\frac{B^2 (b f-a g)^4 n^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{2 b^4 g}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,a+b x\right )}{2 b^4 g}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \int \frac{\log \left (\frac{b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{2 b^3 g}+\frac{\left (B^2 (d f-c g)^4 n^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,c+d x\right )}{2 d^4 g}+\frac{\left (B^2 (d f-c g)^4 n^2\right ) \int \frac{\log \left (\frac{d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{2 d^3 g}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B^2 (b c-a d)^2 (b c+a d) g^3 n^2 x}{6 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2 x}{4 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^3 n^2 x^2}{12 b^2 d^2}-\frac{a^3 B^2 (b c-a d) g^3 n^2 \log (a+b x)}{6 b^4 d}+\frac{a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (a+b x)}{4 b^4 d^2}+\frac{B^2 (b f-a g)^4 n^2 \log ^2(a+b x)}{4 b^4 g}-\frac{B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B^2 c^3 (b c-a d) g^3 n^2 \log (c+d x)}{6 b d^4}-\frac{B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (c+d x)}{4 b^2 d^4}+\frac{B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n^2 \log (c+d x)}{2 b^4 d^4}-\frac{B^2 (d f-c g)^4 n^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{2 d^4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}+\frac{B^2 (d f-c g)^4 n^2 \log ^2(c+d x)}{4 d^4 g}-\frac{B^2 (b f-a g)^4 n^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{2 b^4 g}+\frac{\left (B^2 (b f-a g)^4 n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{2 b^4 g}+\frac{\left (B^2 (d f-c g)^4 n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{2 d^4 g}\\ &=-\frac{A B (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n x}{2 b^3 d^3}-\frac{B^2 (b c-a d)^2 (b c+a d) g^3 n^2 x}{6 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^2 (4 b d f-b c g-a d g) n^2 x}{4 b^3 d^3}+\frac{B^2 (b c-a d)^2 g^3 n^2 x^2}{12 b^2 d^2}-\frac{a^3 B^2 (b c-a d) g^3 n^2 \log (a+b x)}{6 b^4 d}+\frac{a^2 B^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (a+b x)}{4 b^4 d^2}+\frac{B^2 (b f-a g)^4 n^2 \log ^2(a+b x)}{4 b^4 g}-\frac{B^2 (b c-a d) g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n (a+b x) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )}{2 b^4 d^3}-\frac{B (b c-a d) g^2 (4 b d f-b c g-a d g) n x^2 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{4 b^2 d^2}-\frac{B (b c-a d) g^3 n x^3 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{6 b d}-\frac{B (b f-a g)^4 n \log (a+b x) \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )}{2 b^4 g}+\frac{(f+g x)^4 \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right )^2}{4 g}+\frac{B^2 c^3 (b c-a d) g^3 n^2 \log (c+d x)}{6 b d^4}-\frac{B^2 c^2 (b c-a d) g^2 (4 b d f-b c g-a d g) n^2 \log (c+d x)}{4 b^2 d^4}+\frac{B^2 (b c-a d)^2 g \left (a^2 d^2 g^2-a b d g (4 d f-c g)+b^2 \left (6 d^2 f^2-4 c d f g+c^2 g^2\right )\right ) n^2 \log (c+d x)}{2 b^4 d^4}-\frac{B^2 (d f-c g)^4 n^2 \log \left (-\frac{d (a+b x)}{b c-a d}\right ) \log (c+d x)}{2 d^4 g}+\frac{B (d f-c g)^4 n \left (A+B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{2 d^4 g}+\frac{B^2 (d f-c g)^4 n^2 \log ^2(c+d x)}{4 d^4 g}-\frac{B^2 (b f-a g)^4 n^2 \log (a+b x) \log \left (\frac{b (c+d x)}{b c-a d}\right )}{2 b^4 g}-\frac{B^2 (b f-a g)^4 n^2 \text{Li}_2\left (-\frac{d (a+b x)}{b c-a d}\right )}{2 b^4 g}-\frac{B^2 (d f-c g)^4 n^2 \text{Li}_2\left (\frac{b (c+d x)}{b c-a d}\right )}{2 d^4 g}\\ \end{align*}

Mathematica [A]  time = 1.04064, size = 757, normalized size = 0.82 \[ \frac{(f+g x)^4 \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )^2-\frac{B n \left (3 b^4 B n (d f-c g)^4 \left (2 \text{PolyLog}\left (2,\frac{b (c+d x)}{b c-a d}\right )+\log (c+d x) \left (2 \log \left (\frac{d (a+b x)}{a d-b c}\right )-\log (c+d x)\right )\right )-3 B d^4 n (b f-a g)^4 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac{b (c+d x)}{b c-a d}\right )\right )-2 \text{PolyLog}\left (2,\frac{d (a+b x)}{a d-b c}\right )\right )+6 A b d g^2 x (b c-a d) \left (a^2 d^2 g^2+a b d g (c g-4 d f)+b^2 \left (c^2 g^2-4 c d f g+6 d^2 f^2\right )\right )+6 B d g^2 (a+b x) (b c-a d) \left (a^2 d^2 g^2+a b d g (c g-4 d f)+b^2 \left (c^2 g^2-4 c d f g+6 d^2 f^2\right )\right ) \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )-6 B g^2 n (b c-a d)^2 \log (c+d x) \left (a^2 d^2 g^2+a b d g (c g-4 d f)+b^2 \left (c^2 g^2-4 c d f g+6 d^2 f^2\right )\right )+B g^4 n (b c-a d) \left (2 a^3 d^3 \log (a+b x)+b d x (b c-a d) (2 a d+2 b c-b d x)-2 b^3 c^3 \log (c+d x)\right )-3 B g^3 n (b c-a d) (a d g+b c g-4 b d f) \left (b \left (d x (a d-b c)+b c^2 \log (c+d x)\right )-a^2 d^2 \log (a+b x)\right )+3 b^2 d^2 g^3 x^2 (b c-a d) (-a d g-b c g+4 b d f) \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )+2 b^3 d^3 g^4 x^3 (b c-a d) \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )-6 b^4 (d f-c g)^4 \log (c+d x) \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )+6 d^4 (b f-a g)^4 \log (a+b x) \left (B \log \left (e \left (\frac{a+b x}{c+d x}\right )^n\right )+A\right )\right )}{3 b^4 d^4}}{4 g} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2,x]

[Out]

((f + g*x)^4*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 - (B*n*(6*A*b*d*(b*c - a*d)*g^2*(a^2*d^2*g^2 + a*b*d*g*(
-4*d*f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*x + 6*B*d*(b*c - a*d)*g^2*(a^2*d^2*g^2 + a*b*d*g*(-4*d*
f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n] + 3*b^2*d^2*(b*c -
a*d)*g^3*(4*b*d*f - b*c*g - a*d*g)*x^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + 2*b^3*d^3*(b*c - a*d)*g^4*x^3*
(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + 6*d^4*(b*f - a*g)^4*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n
]) - 6*B*(b*c - a*d)^2*g^2*(a^2*d^2*g^2 + a*b*d*g*(-4*d*f + c*g) + b^2*(6*d^2*f^2 - 4*c*d*f*g + c^2*g^2))*n*Lo
g[c + d*x] - 6*b^4*(d*f - c*g)^4*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] + B*(b*c - a*d)*g^4*n*(b*
d*(b*c - a*d)*x*(2*b*c + 2*a*d - b*d*x) + 2*a^3*d^3*Log[a + b*x] - 2*b^3*c^3*Log[c + d*x]) - 3*B*(b*c - a*d)*g
^3*(-4*b*d*f + b*c*g + a*d*g)*n*(-(a^2*d^2*Log[a + b*x]) + b*(d*(-(b*c) + a*d)*x + b*c^2*Log[c + d*x])) - 3*B*
d^4*(b*f - a*g)^4*n*(Log[a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*(a + b*x
))/(-(b*c) + a*d)]) + 3*b^4*B*(d*f - c*g)^4*n*((2*Log[(d*(a + b*x))/(-(b*c) + a*d)] - Log[c + d*x])*Log[c + d*
x] + 2*PolyLog[2, (b*(c + d*x))/(b*c - a*d)])))/(3*b^4*d^4))/(4*g)

________________________________________________________________________________________

Maple [F]  time = 0.428, size = 0, normalized size = 0. \begin{align*} \int \left ( gx+f \right ) ^{3} \left ( A+B\ln \left ( e \left ({\frac{bx+a}{dx+c}} \right ) ^{n} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^3*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

[Out]

int((g*x+f)^3*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

________________________________________________________________________________________

Maxima [B]  time = 3.99702, size = 3579, normalized size = 3.88 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="maxima")

[Out]

1/2*A*B*g^3*x^4*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/4*A^2*g^3*x^4 + 2*A*B*f*g^2*x^3*log(e*(b*x/(d*x + c
) + a/(d*x + c))^n) + A^2*f*g^2*x^3 + 3*A*B*f^2*g*x^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 3/2*A^2*f^2*g*x
^2 - 1/12*A*B*g^3*n*(6*a^4*log(b*x + a)/b^4 - 6*c^4*log(d*x + c)/d^4 + (2*(b^3*c*d^2 - a*b^2*d^3)*x^3 - 3*(b^3
*c^2*d - a^2*b*d^3)*x^2 + 6*(b^3*c^3 - a^3*d^3)*x)/(b^3*d^3)) + A*B*f*g^2*n*(2*a^3*log(b*x + a)/b^3 - 2*c^3*lo
g(d*x + c)/d^3 - ((b^2*c*d - a*b*d^2)*x^2 - 2*(b^2*c^2 - a^2*d^2)*x)/(b^2*d^2)) - 3*A*B*f^2*g*n*(a^2*log(b*x +
 a)/b^2 - c^2*log(d*x + c)/d^2 + (b*c - a*d)*x/(b*d)) + 2*A*B*f^3*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) + 2*
A*B*f^3*x*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + A^2*f^3*x - 1/12*(6*a^3*c*d^3*g^3*n^2 - 3*(8*c*d^3*f*g^2*n^
2 - c^2*d^2*g^3*n^2)*a^2*b + 2*(18*c*d^3*f^2*g*n^2 - 6*c^2*d^2*f*g^2*n^2 + c^3*d*g^3*n^2)*a*b^2 + (24*c*d^3*f^
3*n*log(e) - (11*g^3*n^2 + 6*g^3*n*log(e))*c^4 + 12*(3*f*g^2*n^2 + 2*f*g^2*n*log(e))*c^3*d - 36*(f^2*g*n^2 + f
^2*g*n*log(e))*c^2*d^2)*b^3)*B^2*log(d*x + c)/(b^3*d^4) + 1/2*(4*a*b^3*d^4*f^3*n^2 - 6*a^2*b^2*d^4*f^2*g*n^2 +
 4*a^3*b*d^4*f*g^2*n^2 - a^4*d^4*g^3*n^2 - (4*c*d^3*f^3*n^2 - 6*c^2*d^2*f^2*g*n^2 + 4*c^3*d*f*g^2*n^2 - c^4*g^
3*n^2)*b^4)*(log(b*x + a)*log((b*d*x + a*d)/(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))*B^2/(b^4*d^4
) + 1/12*(3*B^2*b^4*d^4*g^3*x^4*log(e)^2 + 6*(4*c*d^3*f^3*n^2 - 6*c^2*d^2*f^2*g*n^2 + 4*c^3*d*f*g^2*n^2 - c^4*
g^3*n^2)*B^2*b^4*log(b*x + a)*log(d*x + c) - 3*(4*c*d^3*f^3*n^2 - 6*c^2*d^2*f^2*g*n^2 + 4*c^3*d*f*g^2*n^2 - c^
4*g^3*n^2)*B^2*b^4*log(d*x + c)^2 + 2*(a*b^3*d^4*g^3*n*log(e) - (c*d^3*g^3*n*log(e) - 6*d^4*f*g^2*log(e)^2)*b^
4)*B^2*x^3 + ((g^3*n^2 - 3*g^3*n*log(e))*a^2*b^2*d^4 - 2*(c*d^3*g^3*n^2 - 6*d^4*f*g^2*n*log(e))*a*b^3 - (12*c*
d^3*f*g^2*n*log(e) - 18*d^4*f^2*g*log(e)^2 - (g^3*n^2 + 3*g^3*n*log(e))*c^2*d^2)*b^4)*B^2*x^2 - 3*(4*a*b^3*d^4
*f^3*n^2 - 6*a^2*b^2*d^4*f^2*g*n^2 + 4*a^3*b*d^4*f*g^2*n^2 - a^4*d^4*g^3*n^2)*B^2*log(b*x + a)^2 - ((5*g^3*n^2
 - 6*g^3*n*log(e))*a^3*b*d^4 - (5*c*d^3*g^3*n^2 + 12*(f*g^2*n^2 - 2*f*g^2*n*log(e))*d^4)*a^2*b^2 + (24*c*d^3*f
*g^2*n^2 - 5*c^2*d^2*g^3*n^2 - 36*d^4*f^2*g*n*log(e))*a*b^3 + (36*c*d^3*f^2*g*n*log(e) - 12*d^4*f^3*log(e)^2 +
 (5*g^3*n^2 + 6*g^3*n*log(e))*c^3*d - 12*(f*g^2*n^2 + 2*f*g^2*n*log(e))*c^2*d^2)*b^4)*B^2*x + ((11*g^3*n^2 - 6
*g^3*n*log(e))*a^4*d^4 - 2*(c*d^3*g^3*n^2 + 6*(3*f*g^2*n^2 - 2*f*g^2*n*log(e))*d^4)*a^3*b + 3*(4*c*d^3*f*g^2*n
^2 - c^2*d^2*g^3*n^2 + 12*(f^2*g*n^2 - f^2*g*n*log(e))*d^4)*a^2*b^2 - 6*(6*c*d^3*f^2*g*n^2 - 4*c^2*d^2*f*g^2*n
^2 + c^3*d*g^3*n^2 - 4*d^4*f^3*n*log(e))*a*b^3)*B^2*log(b*x + a) + 3*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4*d^4*f*g^
2*x^3 + 6*B^2*b^4*d^4*f^2*g*x^2 + 4*B^2*b^4*d^4*f^3*x)*log((b*x + a)^n)^2 + 3*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4
*d^4*f*g^2*x^3 + 6*B^2*b^4*d^4*f^2*g*x^2 + 4*B^2*b^4*d^4*f^3*x)*log((d*x + c)^n)^2 + (6*B^2*b^4*d^4*g^3*x^4*lo
g(e) - 6*(4*c*d^3*f^3*n - 6*c^2*d^2*f^2*g*n + 4*c^3*d*f*g^2*n - c^4*g^3*n)*B^2*b^4*log(d*x + c) + 2*(a*b^3*d^4
*g^3*n - (c*d^3*g^3*n - 12*d^4*f*g^2*log(e))*b^4)*B^2*x^3 + 3*(4*a*b^3*d^4*f*g^2*n - a^2*b^2*d^4*g^3*n - (4*c*
d^3*f*g^2*n - c^2*d^2*g^3*n - 12*d^4*f^2*g*log(e))*b^4)*B^2*x^2 + 6*(6*a*b^3*d^4*f^2*g*n - 4*a^2*b^2*d^4*f*g^2
*n + a^3*b*d^4*g^3*n - (6*c*d^3*f^2*g*n - 4*c^2*d^2*f*g^2*n + c^3*d*g^3*n - 4*d^4*f^3*log(e))*b^4)*B^2*x + 6*(
4*a*b^3*d^4*f^3*n - 6*a^2*b^2*d^4*f^2*g*n + 4*a^3*b*d^4*f*g^2*n - a^4*d^4*g^3*n)*B^2*log(b*x + a))*log((b*x +
a)^n) - (6*B^2*b^4*d^4*g^3*x^4*log(e) - 6*(4*c*d^3*f^3*n - 6*c^2*d^2*f^2*g*n + 4*c^3*d*f*g^2*n - c^4*g^3*n)*B^
2*b^4*log(d*x + c) + 2*(a*b^3*d^4*g^3*n - (c*d^3*g^3*n - 12*d^4*f*g^2*log(e))*b^4)*B^2*x^3 + 3*(4*a*b^3*d^4*f*
g^2*n - a^2*b^2*d^4*g^3*n - (4*c*d^3*f*g^2*n - c^2*d^2*g^3*n - 12*d^4*f^2*g*log(e))*b^4)*B^2*x^2 + 6*(6*a*b^3*
d^4*f^2*g*n - 4*a^2*b^2*d^4*f*g^2*n + a^3*b*d^4*g^3*n - (6*c*d^3*f^2*g*n - 4*c^2*d^2*f*g^2*n + c^3*d*g^3*n - 4
*d^4*f^3*log(e))*b^4)*B^2*x + 6*(4*a*b^3*d^4*f^3*n - 6*a^2*b^2*d^4*f^2*g*n + 4*a^3*b*d^4*f*g^2*n - a^4*d^4*g^3
*n)*B^2*log(b*x + a) + 6*(B^2*b^4*d^4*g^3*x^4 + 4*B^2*b^4*d^4*f*g^2*x^3 + 6*B^2*b^4*d^4*f^2*g*x^2 + 4*B^2*b^4*
d^4*f^3*x)*log((b*x + a)^n))*log((d*x + c)^n))/(b^4*d^4)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (A^{2} g^{3} x^{3} + 3 \, A^{2} f g^{2} x^{2} + 3 \, A^{2} f^{2} g x + A^{2} f^{3} +{\left (B^{2} g^{3} x^{3} + 3 \, B^{2} f g^{2} x^{2} + 3 \, B^{2} f^{2} g x + B^{2} f^{3}\right )} \log \left (e \left (\frac{b x + a}{d x + c}\right )^{n}\right )^{2} + 2 \,{\left (A B g^{3} x^{3} + 3 \, A B f g^{2} x^{2} + 3 \, A B f^{2} g x + A B f^{3}\right )} \log \left (e \left (\frac{b x + a}{d x + c}\right )^{n}\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="fricas")

[Out]

integral(A^2*g^3*x^3 + 3*A^2*f*g^2*x^2 + 3*A^2*f^2*g*x + A^2*f^3 + (B^2*g^3*x^3 + 3*B^2*f*g^2*x^2 + 3*B^2*f^2*
g*x + B^2*f^3)*log(e*((b*x + a)/(d*x + c))^n)^2 + 2*(A*B*g^3*x^3 + 3*A*B*f*g^2*x^2 + 3*A*B*f^2*g*x + A*B*f^3)*
log(e*((b*x + a)/(d*x + c))^n), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**3*(A+B*ln(e*((b*x+a)/(d*x+c))**n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (g x + f\right )}^{3}{\left (B \log \left (e \left (\frac{b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^3*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="giac")

[Out]

integrate((g*x + f)^3*(B*log(e*((b*x + a)/(d*x + c))^n) + A)^2, x)